﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Drawing.Imaging;

namespace THO7AlgoritmTimerApplication {
    class Find_numberplate : VisionAlgorithm {
        public Find_numberplate(String name) : base(name) { }
        public override Bitmap DoAlgorithm(Bitmap sourceImage) {
            Bitmap destImage = new Bitmap(sourceImage);
            destImage = (new To16colors("16").DoAlgorithm(destImage));
            /*brightness b = new brightness("b");
            b.setMarge(999);
            destImage = b.DoAlgorithm(destImage);*/
            yellow_filter yf = new yellow_filter("yf");
            yf.setMarge(25);
            destImage = yf.DoAlgorithm(destImage);
            contrast_add ca = new contrast_add("ca");
            ca.setMarge(100);
            destImage = ca.DoAlgorithm(destImage);
            destImage = (new Remove_black("rb").DoAlgorithm(destImage));
            Rotate90 r = new Rotate90("r90");
            r.setMarge(1);
            destImage = r.DoAlgorithm(destImage);
            destImage = (new Remove_black("rb1").DoAlgorithm(destImage));
            r.setMarge(2);
            destImage = r.DoAlgorithm(destImage);
            return destImage;
        }
    }
}
